<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<script>
		var webRoot = '[[${#httpServletRequest.getScheme() + "://" + #httpServletRequest.getServerName() + ":" + #httpServletRequest.getServerPort() + #httpServletRequest.getContextPath()}]]';
	</script>

	<body>
		<div>
			<input type="hidden" id="taskId" name="taskId" th:value="${taskId}" />
			<label for="userId">用户ID:</label><input type="text" id="userId" name="userId" />
		</div>
		<div>
			<button onclick="claimTask();">领取</button>
		</div>
	</body>
	<script th:src="@{/common.js}"></script>
	<script th:src="@{/jquery.min.js}"></script>
	<script>
		function claimTask() {
			$.ajax({
				type: "post",
				url: webRoot + "/proTask/claimGroupTask",
				dataType: "json",
				data: {
					taskId: $.trim($("#taskId").val()),
					userId: $.trim($("#userId").val()),
					isAjax: 1
				},
				success: function(data) {
					alert(data.status + ":" + data.message);
				}
			});
		}
	</script>

</html>